#include <spdlog/spdlog.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/sinks/rotating_file_sink.h>
#include <spdlog/async.h>
#include <iostream>

int main(int argc, char *argv[])
{
    auto logger = spdlog::stdout_color_mt<spdlog::async_factory>("stdout_logger");
    logger->set_level(spdlog::level::err);
    logger->set_pattern("[%H:%M:%S][%-7l]: %v");
    std::string str = "你好哇";
    for (int i = 0; i < 10; i++) {
        logger->error("hello world - {} {}", i, str);
    }
    return 0;
}